package com.qfmy.webapp.controller.novel;

import com.qfmy.common.result.Result;
import com.qfmy.webapp.service.novel.CommentReplyLikesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 清风明月
 * @Package com.qfmy.web.app.controller.novel
 * @date 2025/11/13
 * @description 回复评论的点赞
 */
@RestController
@RequestMapping("/app/commentReplyLike")
public class CommentReplyLikesController {

    /**
     * 注入service
     */
    @Autowired
    private CommentReplyLikesService commentReplyLikesService;

    /**
     * 进行点赞
     */
    @RequestMapping("/addCommentReplyLikes")
    public Result<String> addCommentReplyLikes(@RequestParam Integer replyId) {
         commentReplyLikesService.addCommentReplyLikes(replyId);
         return Result.ok();
    }

    /**
     * 取消点赞
     */
    @RequestMapping("/cancelCommentReplyLikes")
    public Result<String> cancelCommentReplyLikes(@RequestParam Integer replyId) {
        commentReplyLikesService.cancelCommentReplyLikes(replyId);
        return Result.ok();
    }


}
